//
//  HMStatusRetweetView.swift
//  Weibo
//
//  Created by 吴少飞 on 16/9/23.
//  Copyright © 2016年 wushaofei. All rights reserved.
//

import UIKit

class HMStatusRetweetView: UIView {

    var statusViewModel: HMStatusesViewModel? {
        didSet {
            contentLabel.text = statusViewModel?.retweetContent
        }
    }
    
    //  MARK: --    懒加载
    private lazy var contentLabel: UILabel = {
        let label = UILabel(textFont: 13, textColor: UIColor.lightGray)
        //  多行显示
        label.numberOfLines = 0
        return label
        
    }()
    
    override init(frame: CGRect) {
        super.init(frame: frame)
        setupUI()
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    
    //  添加控件设置约束
    private func setupUI() {
        
        addSubview(contentLabel)
        
        contentLabel.snp_makeConstraints { (make) in
            make.top.equalTo(self).offset(HMStatusesCellMargin)
            make.leading.equalTo(self).offset(HMStatusesCellMargin)
            make.right.equalTo(self).offset(-HMStatusesCellMargin)
        }
        
        
        self.snp_makeConstraints { (make) in
            make.bottom.equalTo(contentLabel).offset(HMStatusesCellMargin)
        }
        
        
    }
    
    
    

    

}
